1. Field of the Invention
The present invention relates to a time measuring technique for use in a control device.
2. Description of the Related Art
An engine electronic control unit (ECU) has recently faced a demand for control to measure a time during which an engine has stopped. Measuring a time during which an ignition switch is turned off, i.e., a time during which the engine electronic control unit is stopped, is required to predict, based on the time from the preceding engine stop, a cooling level of the engine and the amounts by which engine oil has dropped and restored, and then to modify control parameters at the next engine startup.
A known technique for satisfying such a demand is disclosed in, e.g., Patent Reference 1 (JP,A 2002-341067). According to the known technique, a dedicated circuit comprising a comparator, a capacitor, etc. is provided to measure a turned-off time of an ignition switch.
With the disclosed method, a microcomputer is started up at intervals of a constant time to measure the charging/discharging time of the capacitor and the number of times at which the capacitor has been charged and discharged, and the turned-off time of the ignition switch is measured by counting the number of times at which the capacitor has been charged and discharged.